<!--
 * @Author: hucc
 * @Date: 2021-09-29 10:21:59
 * @LastEditors: hucc
 * @LastEditTime: 2021-09-29 16:05:40
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./jquery.js"></script>
    <script>
        //异步请求同步化 先拿到结果 再处理结果
        const baseURL = "http://47.94.46.113:8888"
            //async 将这个函数标记为异步函数
        async function findAllCategory() {
            //await 标记为异步请求
            //async await 相辅相成 缺一不可
            let res = await $.ajax({
                url: baseURL + "/index/category/findAll",
                method: 'get'
            })
            console.log(res);
        }
        findAllCategory();
    </script>
</head>

<body>

</body>

</html>